// 配置路由
// 1. 引入vue，vue-router
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
// 2. 示例化vue-router对象
const router = new VueRouter({
  routes: [
    { path: '/login', component: ()=>import('../views/login.vue') },
    { 
      path: '/', 
      component: ()=>import('../views/layout.vue'),
      children: [
        { path: '', component: ()=>import('../03表单.vue')},
        { path: 'tree', component: ()=>import('../04树.vue')},
        { path: 'table', component: ()=>import('../01表格.vue')}
      ] 
    }
  ]
})
// 3. 导出
export default router

